import request from '@/utils/request'

// 查询按用户授权列表
export function listAuthUser(query) {
  return request({
    url: '/am/authUser/list',
    method: 'get',
    params: query
  })
}

// 查询按用户授权详细
export function getAuthUser(id) {
  return request({
    url: '/am/authUser/' + id,
    method: 'get'
  })
}

// 新增按用户授权
export function addAuthUser(data) {
  return request({
    url: '/am/authUser',
    method: 'post',
    data: data
  })
}

// 修改按用户授权
export function updateAuthUser(data) {
  return request({
    url: '/am/authUser',
    method: 'put',
    data: data
  })
}

// 删除按用户授权
export function delAuthUser(id) {
  return request({
    url: '/am/authUser/' + id,
    method: 'delete'
  })
}

// 查看文件夹
export function listAuthUserFolder(id){
    return request({
        url: '/am/authUser/listAuthFolder/'+id,
        method: 'get',
    })
}


// 给文件夹授权
export function allotUserFolder(data){
    return request({
        url: '/am/authUser/allotFolder',
        method: 'post',
        data: data
    })
}
